package priv.mill.graph.search;

public class Stack {
    public static final int SIZE = 20;
    private int[] st;
    private int top;

    public Stack() {
        st = new int[SIZE];
        top = -1;
    }

    public void push(int v) {
        st[++top] = v;
    }

    public int pop() {
        return st[top--];
    }

    public int peek() {
        return st[top];
    }

    public boolean isEmpty() {
        return top == -1;
    }
}
